<!DOCTYPE html>
<html lang="en"
      xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.thymeleaf.org"
      layout:decorator="layout/m_master">

<div layout:fragment="content">
    <div class="page-group">
        <div class="page page_marketing_recruit">
            <div class="page-content">

                <div class="backbtn" onclick="bottlecms.back()">
                    返回
                </div>

                <div class="recruit-title">
                    扩大我的单身团
                </div>
                <div class="mysinglebox">
                    <div class="tit">
                        ——————&nbsp;&nbsp;&nbsp;我的单身团([[${recruitCount}]])&nbsp;&nbsp;&nbsp;——————
                    </div>
                    <ul class="list">
                        <li th:each="item:${recruitList}">
                            <div class="imgbox">
                                <div class="img" style="" th:if="${item.userId ne null}"
                                th:style="'background:url('+${item.photo}+'_50x50.jpg)'">
                                </div>
<!--                                如果没有推荐的-->
                                <div class="img" style="" th:if="${item.userId eq null}"></div>
                            </div>
                        </li>
<!--                        <li>-->
<!--                            <div class="imgbox">-->
<!--                                <div class="img" style="">-->
<!--                                </div>-->
<!--                            </div>-->
<!--                        </li>-->

                    </ul>
                </div>
                <div class="conbtnbox">
                    <div class="btn   zhaopeiye">
                        召唤我的单身朋友
                    </div>
                    <div style="height: 20px;"></div>
                    <div class="btn btn-success   js-poster">
                        生成海报
                    </div>

                </div>
                <div class="conbox">
                    <div class="tit">
                        ——————&nbsp;&nbsp;&nbsp;招募方式&nbsp;&nbsp;&nbsp;——————
                    </div>
                    <p>
                        方法一：分享当前页面给好友
                        <br>
                        方法二：生成二维码海报，长按海报分享给好友
                        <br>
                    </p>
                </div>
                <!-- <div class="conbox">
                    <div class="qrcodebox">
                        <div class="code" id="code" style=" display:none;">
                        </div>
                        <img class="codeimg" id="codeimg"/>
                    </div>
                </div> -->

            </div>
        </div>
    </div>
    <div th:replace="layout/m_layout::systemJs"></div>
    <script type="text/javascript">
    </script>
    <script>
        $(".zhaopeiye").click(function(e) {
            $('body').append('<div class="sharepop" onClick="this.parentNode.removeChild(this)"></div>');
        });
    </script>


    <script>
        // 获取海报
        $(".js-poster").click(function(e) {
            var loadingobj = bottlecms.loading("海报合成中～");

            bottlecms.get("/m/ajax/center/marketing/getposter",null,function(data){
                loadingobj.close();
                if (data.success == true) {

                    bottlecms.modal({
                        content: '<div><img src="'+data.obj+'" width="300" height="500"></div>'
                    });
                }else{
                    bottlecms.toast(data.msg);
                }
            });
        });
    </script>

</div>
</html>
